//
//  QZSetVC.m
//  map
//
//  Created by 000 on 16/9/13.
//  Copyright © 2016年 faner. All rights reserved.
//

#import "QZSetVC.h"
#import "DetailModel.h"
#import "QZLoginVC.h"
#import "AppDelegate.h"
@interface QZSetVC ()
{
    BOOL LogSuccess;
    
    BOOL isSaveLicheng;

    NSUserDefaults *userDefaults;
    
    NSUserDefaults *userDefaults1;
}
- (IBAction)logoutBtnClick:(id)sender;

@end

@implementation QZSetVC

- (void)viewDidLoad {
    [super viewDidLoad];
    userDefaults = [NSUserDefaults standardUserDefaults];
    userDefaults1 = [NSUserDefaults standardUserDefaults];
    // Do any additional setup after loading the view from its nib.
}

- (void)viewWillAppear:(BOOL)animated
{
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (IBAction)logoutBtnClick:(id)sender {
    [userDefaults setBool:NO forKey:@"logState"];
    [userDefaults setBool:NO forKey:@"saveState"];
    [userDefaults synchronize];
    
    [DetailModel shareManger].loginACC=nil;
    [userDefaults1 setObject:@"用户未登录" forKey:@"detailSave"];
    [userDefaults1 synchronize];
    
    NSLog(@",,,,,%@",[UIApplication sharedApplication].windows);
    
    [(AppDelegate *)[UIApplication sharedApplication].delegate logOut];
}
@end
